package net.portly.cst.output;

import net.portly.cst.flex.FlexFamily;
import net.portly.cst.flex.FlexItemType;

public class ToStringOutputFormat extends BaseOutputFormat {

	@Override
	public String getOutput() {
		StringBuilder sb = new StringBuilder();

		// for (PageAssetsContainer : assetModel.getPageAssetsContainer()) {
		sb.append(assetModel.getPageAssetsContainer().toString());
		sb.append(assetModel.getPageAssetsContainer().toStringSA(FlexItemType.PAGEFILTER));
		sb.append(assetModel.getPageAssetsContainer().toStringSA(FlexItemType.PAGEDEF));
		// System.out.println(ff.toStringSA(FlexItemType.ATTRIBUTE));
		// System.out.println(ff.toStringSA(FlexItemType.PARENTDEF));
		// }

		for (FlexFamily ff : assetModel.getFlexFamilies()) {
			sb.append(ff.toString());
			// System.out.println(ff.toStringSA(FlexItemType.FILTER));
			sb.append(ff.toStringSA(FlexItemType.FLEXDEF));
			// System.out.println(ff.toStringSA(FlexItemType.ATTRIBUTE));
			sb.append(ff.toStringSA(FlexItemType.PARENTDEF));
		}

		return sb.toString();
	}

}
